#include "CGameIniDate.h"

CGameIniDate::CGameIniDate(void)
{


}

CGameIniDate::~CGameIniDate(void)
{
}

void CGameIniDate::load()
{

	if (s_CGameIniDate!=NULL)
	{
		return;
	}

	CYQCFile* is = new CYQCFile();
	is->Open(GAMEINITDATE);
	int line = is->ReadIntReverse();

	s_CGameIniDate = new int*[line];
	s_CGameiniDateLine = new int[line];
	for (int i=0;i<line;i++)
	{
		int dateline = is->ReadIntReverse();
		s_CGameIniDate[i] = new int[dateline];
		s_CGameiniDateLine[i] = dateline;
		for (int j=0;j<dateline;j++)
		{
			s_CGameIniDate[i][j] = is->ReadIntReverse();
			//CCLog("%d",s_CGameIniDate[i][j]);
		}
	}
	delete is;


	//CCLog("%d",3<<4);
}

int* CGameIniDate::getIniDateArray(int dateid)
{
	return s_CGameIniDate[dateid];
}
int CGameIniDate::getIniDateArray(int dateid,int arrayid)
{
	return s_CGameIniDate[dateid][arrayid];
}
int CGameIniDate::getIniDateOne(int dateid)
{
	return s_CGameIniDate[dateid][0];
}

int* CGameIniDate::s_CGameiniDateLine = NULL;

int** CGameIniDate::s_CGameIniDate = NULL;
